<template>
  <div class="msgBox" @click="toDetail">
      <img :src="item1.fengmian">
      <div class="msgContent">
        <span v-text="item1.title"></span>
        <span class="writer">比赚：{{this.item1.addtime}}</span>
      </div>
  </div>
</template>
<script>
//import {getSDK} from '../../../service/wxShare.js'//非组件需要添加wxshare.js

export default {
  components:{

  },
  props:['item'],
  created(){
    this.item1 = this.item
  },
  data(){
    return {
      item1:{}
    }
  },
  methods:{
    toDetail(){
      this.$router.push({
          name:'news_detail',
          params:{
              item:this.item1,
              id:this.item1.id
            }
        }
      )
    }
  },
  watch:{
    item(val){
      this.item1 = val
    }
  }
}
</script>
<style lang="less" scoped>
@import '../../../style/mixin.less';

  .msgBox{
    .wh(100%,2.4533rem);
    box-shadow:2px 2px 10px #f1f1f1; 
    // border-bottom: 1px solid #aaa;
    margin-bottom: .1rem;
    .bs();
    .fx(row,flex-start);
    padding-left: 0.8rem;
    img{
      .wh(1.6533rem,1.6533rem);
      .borderRadius(.24rem)
    }
    .msgContent{
      .wh(70%,1.66rem);
      .fx(column,space-between,flex-start);
      .bs();
      padding-top: .12rem;
      margin-left: .4rem;
      .sc(0.4rem,#000);
      line-height: .5rem;
      .writer{
        .sc(0.2667rem,#aaa)
      }
    }
  }
</style>
